package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.TlPddGoodsSkuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TlPddGoodsSkuMapper;
import com.ruoyi.system.domain.TlPddGoodsSku;
import com.ruoyi.system.service.ITlPddGoodsSkuService;

/**
 * 拼多多商品sku列Service业务层处理
 *
 * @author lhs
 * @date 2023-11-08
 */
@Service
public class TlPddGoodsSkuServiceImpl implements ITlPddGoodsSkuService
{
    @Autowired
    private TlPddGoodsSkuMapper tlPddGoodsSkuMapper;

    /**
     * 查询拼多多商品sku列
     *
     * @param id 拼多多商品sku列主键
     * @return 拼多多商品sku列
     */
    @Override
    public TlPddGoodsSku selectTlPddGoodsSkuById(Long id)
    {
        return tlPddGoodsSkuMapper.selectTlPddGoodsSkuById(id);
    }

    /**
     * 查询拼多多商品sku列列表
     *
     * @param tlPddGoodsSku 拼多多商品sku列
     * @return 拼多多商品sku列
     */
    @Override
    public List<TlPddGoodsSkuVo> selectTlPddGoodsSkuList(TlPddGoodsSku tlPddGoodsSku)
    {
        return tlPddGoodsSkuMapper.selectTlPddGoodsSkuList(tlPddGoodsSku);
    }

    /**
     * 新增拼多多商品sku列
     *
     * @param tlPddGoodsSku 拼多多商品sku列
     * @return 结果
     */
    @Override
    public int insertTlPddGoodsSku(TlPddGoodsSku tlPddGoodsSku)
    {
        return tlPddGoodsSkuMapper.insertTlPddGoodsSku(tlPddGoodsSku);
    }

    @Override
    public int insertTlPddGoodsSkuAll(List<TlPddGoodsSku> tlPddGoodsSku) {
        return tlPddGoodsSkuMapper.insertTlPddGoodsSkuAll(tlPddGoodsSku);
    }

    /**
     * 修改拼多多商品sku列
     *
     * @param tlPddGoodsSku 拼多多商品sku列
     * @return 结果
     */
    @Override
    public int updateTlPddGoodsSku(TlPddGoodsSku tlPddGoodsSku)
    {
        return tlPddGoodsSkuMapper.updateTlPddGoodsSku(tlPddGoodsSku);
    }

    /**
     * 批量删除拼多多商品sku列
     *
     * @param ids 需要删除的拼多多商品sku列主键
     * @return 结果
     */
    @Override
    public int deleteTlPddGoodsSkuByIds(Long[] ids)
    {
        return tlPddGoodsSkuMapper.deleteTlPddGoodsSkuByIds(ids);
    }

    /**
     * 删除拼多多商品sku列信息
     *
     * @param id 拼多多商品sku列主键
     * @return 结果
     */
    @Override
    public int deleteTlPddGoodsSkuById(Long id)
    {
        return tlPddGoodsSkuMapper.deleteTlPddGoodsSkuById(id);
    }

    @Override
    public int deleteTlPddGoodsSkuByUserIdAndOwnerId(Long userId,Long ownerId)
    {
        return tlPddGoodsSkuMapper.deleteTlPddGoodsSkuByUserIdAndOwnerId(userId,ownerId);
    }

    @Override
    public int deleteTlPddGoodsSkuByGoodsIds(Long[] goodsIds)
    {
        return tlPddGoodsSkuMapper.deleteTlPddGoodsSkuByGoodsIds(goodsIds);
    }
}
